<script setup>
    import MyForm from "./components/MyForm.vue"
    import { ref } from "vue";
    const formRef = ref(null)
    
    const onLogin = () => {
        if(formRef.value.validate()) {
            console.log("ok");
        }else {
            console.log("error");
            
        }
    }


</script>
    
<template>
    <my-form ref="formRef"></my-form>
    <button @click="onLogin">登录</button>
</template>
    
<style>
    
</style>